using System;
using System.Collections.Generic;
using System.ComponentModel;
using Microsoft.Ccr.Core;
using Microsoft.Dss.Core.Attributes;
using Microsoft.Dss.ServiceModel.Dssp;
using Microsoft.Dss.ServiceModel.DsspServiceBase;
using W3C.Soap;

namespace Bettzueche.Robotics.SerialStepMotor {
    /// <summary>
    /// SerialStepMotor contract class
    /// </summary>
    [DisplayName("Step Motor on serial Port")]
    [Description("This is the contract for a step motor on a serial Port, controlled by an Atmel MCU")]
    public sealed class Contract {
        /// <summary>
        /// DSS contract identifer for SerialStepMotor
        /// </summary>
        [DataMember]
        public const string Identifier = "http://schemas.haw-hamburg.de/2010/07/serialstepmotor.html";
    }

    [Flags]
    enum ByteInstruction {
        MotorOff = 0x00,
        /// <summary>Set Motor Power On. Equivalent to STOP!</summary>
        MotorOn = 0x40,
        /// <summary>Turning clockwise </summary>
        TurnClock = 0x80,
        /// <summary>Turning counter-clockwise </summary>
        TurnCounter = 0xC0
    }
}
